import Vue from 'vue'
import Router from 'vue-router'
//登录
import Login from '@/views/Login/Login'
// 首页
import Index from '@/views/Index/Index'
// 用户相关
import UserList from '@/views/User/UserList'
import UserListDetails from '@/views/User/UserListDetails'
import AgencyList from '@/views/User/AgencyList'
import AgencyListDetails from '@/views/User/AgencyListDetails'
import PayRank from '@/views/User/PayRank'
import PayUser from '@/views/User/PayUser'
// 订单管理
import Orders from '@/views/Order/Orders'
import OrdersDetails from '@/views/Order/OrdersDetails'
// 设备管理
import Equipment from '@/views/Equipment/Equipment'
import EquipmentDetails from '@/views/Equipment/EquipmentDetails'
import PriceList from '@/views/Equipment/PriceList'
//生活服务
/* import ServicesList from '@/views/LifeServices/ServicesList.vue'//服务类目
import ServicesListTwo from '@/views/LifeServices/ServicesListTwo.vue'//服务类目---二级类目
import ArtisanCheck from '@/views/LifeServices/ArtisanCheck.vue'//技工审核
import ArtisanCheckDetail from '@/views/LifeServices/ArtisanCheckDetail.vue'//技工审核--查看
import ArtisanList from '@/views/LifeServices/ArtisanList.vue'//技工列表
import ArtisanListDetail from '@/views/LifeServices/ArtisanListDetail.vue'//技工列表-查看
import Template from '@/views/LifeServices/Template.vue'//模板商品
import TemplateDeatil from '@/views/LifeServices/TemplateDeatil.vue'//模板商品--编辑
import TemplateAdd from '@/views/LifeServices/TemplateAdd.vue'//模板商品--新增
import WaitingList from '@/views/LifeServices/WaitingList.vue'//待接订单
import WaitingListDetail from '@/views/LifeServices/WaitingListDetail.vue'//待接订单--详情
import Project from '@/views/LifeServices/Project.vue'//项目订单
import ProjectDetail from '@/views/LifeServices/ProjectDetail.vue'//项目订单 --详情
import Refund from '@/views/LifeServices/Refund.vue'//退款订单
import Withdraw from '@/views/LifeServices/Withdraw.vue'//商户提现
import WithdrawDetail from '@/views/LifeServices/WithdrawDetail.vue'//商户提现  -明细
import ArtisanDetail from '@/views/LifeServices/ArtisanDetail.vue'//技工明细
import BlockedList from '@/views/LifeServices/BlockedList.vue'//拉黑名单 */

//小红果生活
import ServiceCategory from '@/views/HongguoLife/ServiceCategory.vue'//服务类目
import ServiceCategoryTwo from '@/views/HongguoLife/ServiceCategoryTwo.vue'//服务类目
import ServiceList from '@/views/HongguoLife/ServiceList.vue'//服务列表
import UserList1 from '@/views/HongguoLife/UserList.vue'//用户列表
import UserListDetail1 from '@/views/HongguoLife/UserListDetail.vue'//用户列表--详情
import HotWord from '@/views/HongguoLife/HotWord.vue'//热词广告
import Banner from '@/views/HongguoLife/Banner.vue'//热词广告
import HotWordTwo from '@/views/HongguoLife/HotWordTwo.vue'//热词广告
import Cell from '@/views/HongguoLife/Cell.vue'//热词广告

Vue.use(Router)

const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

export default new Router({
  // 解决 vue路由跳转时，总是跳转到下一个页面的底部
  /* mode: 'history',
  scrollBehavior (to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition
    } else {
      return { x: 0, y: 0 }
    }
  }, */
  routes: [
    /* 洗车*/
    /* {
      path: '/',
      name: 'Index',
      component: Index,
      meta: {
        title:"首页"
      }
    }, */
    {
      path: '/',
      name: 'UserList',
      component: UserList,
      meta: {
        title:"会员列表"
      }
    },
    {
      path: '/UserListDetails',
      name: 'UserListDetails',
      component: UserListDetails,
      meta: {
        title:"会员信息"
      }
    },
    {
      path: '/AgencyList',
      name: 'AgencyList',
      component: AgencyList,
      meta: {
        title:"代理列表"
      }
    },
    {
      path: '/AgencyListDetails',
      name: 'AgencyListDetails',
      component: AgencyListDetails,
      meta: {
        title:"代理信息"
      }
    },
    {
      path: '/PayRank',
      name: 'PayRank',
      component: PayRank,
      meta: {
        title:"充值记录"
      }
    },
    {
      path: '/PayUser',
      name: 'PayUser',
      component: PayUser,
      meta: {
        title:"付费会员卡"
      }
    },
    {
      path: '/Orders',
      name: 'Ordersr',
      component: Orders,
      meta: {
        title:"自营订单"
      }
    },
    {
      path: '/OrdersDetails',
      name: 'OrdersDetails',
      component: OrdersDetails,
      meta: {
        title:"订单详情"
      }
    },
    {
      path: '/Equipment',
      name: 'Equipment',
      component: Equipment,
      meta: {
        title:"设备列表"
      }
    },
    {
      path: '/EquipmentDetails',
      name: 'EquipmentDetails',
      component: EquipmentDetails,
      meta: {
        title:"设备详情"
      }
    },
    {
      path: '/PriceList',
      name: 'PriceList',
      component: PriceList,
      meta: {
        title:"价格类目"
      }
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login,
      meta: {
        title:"登录"
      }
    },
    /* 小红果生活*/
    {
      path: '/ServiceCategory',
      name: 'ServiceCategory',
      component: ServiceCategory,
      meta: {
        title:"服务类目"
      }
    },
    {
      path: '/ServiceCategoryTwo',
      name: 'ServiceCategoryTwo',
      component: ServiceCategoryTwo,
      meta: {
        title:"服务类目"
      }
    },
    {
      path: '/ServiceList',
      name: 'ServiceList',
      component: ServiceList,
      meta: {
        title:"服务列表"
      }
    },
    {
      path: '/UserList1',
      name: 'UserList1',
      component: UserList1,
      meta: {
        title:"用户列表"
      }
    },
    {
      path: '/UserListDetail1',
      name: 'UserListDetail1',
      component: UserListDetail1,
      meta: {
        title:"用户列表查看"
      }
    },
    {
      path: '/HotWord',
      name: 'HotWord',
      component: HotWord,
      meta: {
        title:"热词广告"
      }
    },
    {
      path: '/Banner',
      name: 'Banner',
      component: Banner,
      meta: {
        title:"Banner广告"
      }
    },
    {
      path: '/HotWordTwo',
      name: 'HotWordTwo',
      component: HotWordTwo,
      meta: {
        title:"首页热词"
      }
    },
    {
      path: '/Cell',
      name: 'Cell',
      component: Cell,
      meta: {
        title:"小区配置"
      }
    },
    /* 生活服务*/
    /* {
      path: '/ServicesList',
      name: 'ServicesList',
      component: ServicesList,
      meta: {
        title:"服务类目"
      }
    },
    {
      path: '/ServicesListTwo',
      name: 'ServicesListTwo',
      component: ServicesListTwo,
      meta: {
        title:"二级类目"
      }
    },
    {
      path: '/ArtisanCheck',
      name: 'ArtisanCheck',
      component: ArtisanCheck,
      meta: {
        title:"技工审核"
      }
    },
    {
      path: '/ArtisanCheckDetail',
      name: 'ArtisanCheckDetail',
      component: ArtisanCheckDetail,
      meta: {
        title:"技工审核详情"
      }
    },
    {
      path: '/ArtisanList',
      name: 'ArtisanList',
      component: ArtisanList,
      meta: {
        title:"技工列表"
      }
    },
    {
      path: '/ArtisanListDetail',
      name: 'ArtisanListDetail',
      component: ArtisanListDetail,
      meta: {
        title:"技工列表详情"
      }
    },
    {
      path: '/Template',
      name: 'Template',
      component: Template,
      meta: {
        title:"模板商品"
      }
    },
    {
      path: '/TemplateDeatil',
      name: 'TemplateDeatil',
      component: TemplateDeatil,
      meta: {
        title:"编辑模板"
      }
    },
    {
      path: '/TemplateAdd',
      name: 'TemplateAdd',
      component: TemplateAdd,
      meta: {
        title:"新增模板"
      }
    },
    {
      path: '/WaitingList',
      name: 'WaitingList',
      component: WaitingList,
      meta: {
        title:"待接订单"
      }
    },
    {
      path: '/WaitingListDetail',
      name: 'WaitingListDetail',
      component: WaitingListDetail,
      meta: {
        title:"订单详情"
      }
    },
    {
      path: '/Project',
      name: 'Project',
      component: Project,
      meta: {
        title:"项目订单"
      }
    },
    {
      path: '/ProjectDetail',
      name: 'ProjectDetail',
      component: ProjectDetail,
      meta: {
        title:"订单详情"
      }
    },
    {
      path: '/Refund',
      name: 'Refund',
      component: Refund,
      meta: {
        title:"退款订单"
      }
    },
    {
      path: '/Withdraw',
      name: 'Withdraw',
      component: Withdraw,
      meta: {
        title:"商户提现"
      }
    },
    {
      path: '/WithdrawDetail',
      name: 'WithdrawDetail',
      component: WithdrawDetail,
      meta: {
        title:"商户提现明细"
      }
    },
    {
      path: '/ArtisanDetail',
      name: 'ArtisanDetail',
      component: ArtisanDetail,
      meta: {
        title:"技工明细"
      }
    },
    {
      path: '/BlockedList',
      name: 'BlockedList',
      component: BlockedList,
      meta: {
        title:"拉黑名单"
      }
    }, */
  ]
})
